package com.by.component.export.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.by.component.export.ExportRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.by.component.export.dto.InfoExportRecordSDTO;
import com.by.component.export.dto.ItemExportRecord4PageSDTO;
import org.apache.ibatis.annotations.Param;

/**
 * 导出记录(ExportRecord)表数据库访问层
 *
 * @author YanBingHao
 * @since 2024-01-23 14:18:35
 */
public interface ExportRecordMapper extends BaseMapper<ExportRecord> {

    Page<ItemExportRecord4PageSDTO> queryPage(@Param("page") Page<ItemExportRecord4PageSDTO> page, @Param("condition") ItemExportRecord4PageSDTO condition);

    int processing(@Param("recordId") Long recordId);

    int processed(@Param("recordId") Long recordId, @Param("exportCount") Long exportCount, @Param("ossId") Long ossId);

    Long unProcessedId(@Param("sysUserId") Long sysUserId, @Param("exportType") Integer exportType);

    void failProcess(@Param("recordId") Long recordId, @Param("failMsg") String failMsg);

    InfoExportRecordSDTO recordInfo(@Param("recordId") Long recordId);

}
